/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.modules.admin.dto.rescue.RescueNoticeConfirmDTO;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 救援工单明细实体类
 *
 * @author ysq
 * @since 2023-02-25
 */
@Data
@TableName("blade_maintain_malfunction_rescue")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "MaintainMalfunctionRescue对象", description = "救援工单明细")
public class MaintainMalfunctionRescue extends TenantEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 工单id
	*/
	@ApiModelProperty(value = "工单id")
	private Long planId;
	/**
	* 项目id
	*/
	@NotNull(message = "项目id不能为空")
	@ApiModelProperty(value = "项目id")
	private Long buildingId;
	/**
	* 电梯id，电梯未知时为0
	*/
	@ApiModelProperty(value = "电梯id，电梯未知时为0")
	private Long elevatorId;
	/**
	* 电梯位置
	*/
	@NotBlank(message = "电梯位置不能为空")
	@ApiModelProperty(value = "电梯位置")
	private String address;
	/**
	* 楼层
	*/
	@ApiModelProperty(value = "楼层")
	private String floor;
	/**
	* 报警人姓名
	*/
	@NotBlank(message = "电梯位置不能为空")
	@ApiModelProperty(value = "报警人姓名")
	private String name;
	/**
	* 联系方式
	*/
	@NotBlank(message = "联系方式不能为空")
	@ApiModelProperty(value = "联系方式")
	private String phone;
	/**
	* 报警类型 0-困人，1-伤人
	*/
	@NotNull(message = "报警类型不能为空")
	@ApiModelProperty(value = "报警类型 0-困人，1-伤人")
	private Integer trapType;
	/**
	* 报警来源（字典key）
	*/
	@NotBlank(message = "报警来源不能为空")
	@ApiModelProperty(value = "报警来源（字典key）")
	private String trapFrom;
	/**
	* 报警来源（字典value）
	*/
	@NotBlank(message = "报警来源值不能为空")
	@ApiModelProperty(value = "报警来源（字典value）")
	private String trapFromValue;
	/**
	* 报警备注
	*/
	@ApiModelProperty(value = "报警备注")
	private String trapDesc;
	/**
	* 救援方式（字典key）
	*/
	@ApiModelProperty(value = "救援方式（字典key）")
	private String rescueMode;
	/**
	* 救援方式（字典value）
	*/
	@ApiModelProperty(value = "救援方式（字典value）")
	private String rescueModeValue;
	/**
	* 救援方式附加说明
	*/
	@ApiModelProperty(value = "救援方式附加说明")
	private String rescueModeRemark;
	/**
	* 图片
	*/
	@ApiModelProperty(value = "图片")
	private String imgUrl;
	/**
	* 救援方式备注说明
	*/
	@ApiModelProperty(value = "救援方式备注说明")
	private String rescueModeDesc;
	/**
	* 停梯原因（字典key）
	*/
	@ApiModelProperty(value = "停梯原因（字典key）")
	private String stopReason;
	/**
	* 停梯原因（字典value）
	*/
	@ApiModelProperty(value = "停梯原因（字典value）")
	private String stopReasonValue;
	/**
	* 停梯原因附加说明
	*/
	@ApiModelProperty(value = "停梯原因附加说明")
	private String stopReasonRemark;
	/**
	* 停梯说明
	*/
	@ApiModelProperty(value = "停梯说明")
	private String stopReasonDesc;

	/**
	 * 到达预警状态
	 */
	@ApiModelProperty(value = "到达预警状态")
	private Integer arrivalWarning;

	@ApiModelProperty(value = "到达预警状态触发时间")
	private Date arrivalWarningTime;

	@ApiModelProperty(value = "预警列表")
	private String warningList;

	@ApiModelProperty(value = "救援要求时间类型 0-默认（30min），1-项目")
	private Integer maximumType;

	@ApiModelProperty(value = "到达时间最大阔值（项目要求）")
	private Date maximumArrivalTime;

	@TableField(exist = false)
	@ApiModelProperty(value = "梯联网关联id")
	private String tlwJoinId;

	@TableField(exist = false)
	@ApiModelProperty(value = "来源 0-梯联网报警，1-一键呼救")
	private Integer from = 0;

	/**
	 * 梯联网-救援id
	 */
	@TableField(exist = false)
	private String rescueId;

	@TableField(exist = false)
	@ApiModelProperty(value = "通过告警信息确认创建维修工单渠道对象")
	private RescueNoticeConfirmDTO confirmDTO;
}
